js: Don't trigger beforerender or rendered for discarded content #5057
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
A listener for
rendered
should not need to check if the content really changed. Though, if such a listener is not triggered anymore,beforerender
listeners also must not be triggered, as they might assume that the content is really being updated and their accompaniedrendered
listener is triggered. (e.g. input-enrichment.js)This might be breaking change and any
Behavior.renderHook
implementation needs to be checked against it. Potentially also in third party modules. As if such an implementation updates the container on its own,beforerender
listeners only have access to the updated container after this change, while they had access to the original beforehand.rendered
listeners should not be that much affected, as for them the change results in the same behavior as if no update has ever been scheduled for the container.fixes #5056